package com.example.netty.tcp.message;

import com.fasterxml.jackson.annotation.JsonProperty;

public class LoginRequest extends BaseMessage {

    public LoginRequest() {
        setMsgType(110); // 关键：显式设置消息类型
    }
    @JsonProperty("imsi")
    private String imsi;

    @JsonProperty("batteryStatus")
    private String batteryStatus;// 0:移动, 1:静止, 2:存储, 3:休眠

    @JsonProperty("hardVersion")
    private String hardVersion; // 硬件版本，bms厂家自定

    @JsonProperty("softVersion")
    private String softVersion; // 软件版本，bms厂家自定

    @JsonProperty("protocolVersion")
    private String protocolVersion; // 协议版本

    @JsonProperty("devType")
    private int devType; // 设备类型；1电池；2换电柜

    public String getHardVersion() {
        return hardVersion;
    }

    public void setHardVersion(String hardVersion) {
        this.hardVersion = hardVersion;
    }

    public int getDevType() {
        return devType;
    }

    public void setDevType(int devType) {
        this.devType = devType;
    }

    public String getProtocolVersion() {
        return protocolVersion;
    }

    public void setProtocolVersion(String protocolVersion) {
        this.protocolVersion = protocolVersion;
    }

    public String getSoftVersion() {
        return softVersion;
    }

    public void setSoftVersion(String softVersion) {
        this.softVersion = softVersion;
    }

    @JsonProperty("imsi")
    public String getImsi() {
        return imsi;
    }

    @JsonProperty("imsi")
    public void setImsi(String imsi) {
        this.imsi = imsi;
    }

    @JsonProperty("batteryStatus")
    public String getBatteryStatus() {
        return batteryStatus;
    }

    @JsonProperty("batteryStatus")
    public void setBatteryStatus(String batteryStatus) {
        this.batteryStatus = batteryStatus;
    }
}
